Component({
  properties: {
    show: Boolean,
    accountList: Array,
    selectedIndex: Number
  },
  methods: {
    onClose() {
      this.setData({ show: false });
    },
    onSelect(e) {
      const index = e.currentTarget.dataset.index;
      this.setData({ show: false });
      this.triggerEvent('select', { index });
    }
  }
}); 